#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>


using namespace std;
using LL = long long;
const int N = 2e5 + 10;

/*
first we should find a data structure to match brackets -----> stack
then we can find the depth is related to the number of '(' in the stack
so we can color then into different color in the stack just like 0101010101.....
*/

int q[N];
int hh = 0, tt = -1;
string s;

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    cin >> s;
    for(int i = 0; i < s.length(); i ++){
        if(s[i] == '('){
            if(tt == -1){
                q[++tt] = 1;
                cout << 1;
            }else{
                int p = 1 ^ q[tt];
                q[++tt] = p;
                cout << p;
            }
        }else{
            int p = q[tt--];
            cout << p;
        }
    }


    return 0;
}